package com.WJY.service.impl;

import com.WJY.dao.BookDao;
import com.WJY.pojo.Book;
import com.WJY.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService {
    @Autowired
    private BookDao bookDao;

    @Override
    public List<Book> queryBookList() {
        return bookDao.queryBookList();
    }

    @Override
    public List<Book> queryBookByBookName(String bookName) {
        return bookDao.queryBookByBookName(bookName);
    }

    @Override
    public Book queryBookById(int id) {
        return bookDao.queryBookById(id);
    }

    @Override
    public int delBookById(int id) {
        return bookDao.delBookById(id);
    }

    @Override
    public int addBook(Book book) {
        return bookDao.addBook(book);
    }

    @Override
    public int updateBook(Book book) {
        return bookDao.updateBook(book);
    }
}
